home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_138 / modulatools / modulatools.source / colortools.def next >
Text File  |  1992-05-06  |  5KB  |  75 lines

  1. (******************************************************************************)
  2. (*                                                                            *)
  3. (*    The global constants and variables defined in this module are optional: *)
  4. (* if you don't want to access their features, you needn't import them into   *)
  5. (* your program. The variables in the parameter lists of the procedures are   *)
  6. (* the only variables you are required to supply.                             *)
  7. (*    When describing the order in which certain routines are called, I have  *)
  8. (* adopted the curly-bracket notation of EBNF: routines in curly brackets {}  *)
  9. (* may be called an arbitrary number of times (0 to n). A, {B}, {C, {D}} thus *)
  10. (* implies that A is called once, followed by an arbitrary number of calls to *)
  11. (* to B, followed by an arbitrary number of calls to C. Each of the calls to  *)
  12. (* C may be followed by an arbitrary number of calls to D. Likewise, {{C},{D}}*)
  13. (* implies an arbitrary number of calls to C and D in any order.              *)
  14. (*                                                                            *)
  15. (******************************************************************************)
  16. (*                                                                            *)
  17. (*  Version 1.00a.002 (Beta) :   March 2, 1988                                *)
  18. (*                                                                            *)
  19. (*    These procedures were originally written under version 1.20 of the TDI  *)
  20. (* Modula-2 compiler. I have rewritten this module to operate under the v2.00 *)
  21. (* compiler. However, should you find any problem or inconsistency with the   *)
  22. (* functionality of this code, please contact me at the following address:    *)
  23. (*                                                                            *)
  24. (*                               Jerry Mack                                   *)
  25. (*                               23 Prospect Hill Ave.                        *)
  26. (*                               Waltham, MA   02154                          *)
  27. (*                                                                            *)
  28. (*    Check the module MenuUtils for TDI's (considerably less powerful) ver-  *)
  29. (* sions of my Menu and IntuitionText procedures. The modules GadgetUtils and *)
  30. (* EasyGadgets should also be of great help.                                  *)
  31. (*                                                                            *)
  32. (******************************************************************************)
  33. (*                                                                            *)
  34. (*    The source code to ColorTools is in the public domain. You may do with  *)
  35. (* it as you please.                                                          *)
  36. (*                                                                            *)
  37. (******************************************************************************)
  38.  
  39. DEFINITION MODULE ColorTools;
  40.  
  41. FROM Intuition IMPORT ScreenPtr;
  42.  
  43.  
  44.    (* These color values are from p.294 of the Amiga Programmer's Handbook *)
  45.    (*  Vol. 1 by Eugene P. Mortimore; Sybex, Inc., Berkeley; 1987.         *)
  46.  
  47. CONST
  48.    White     = 0FFFH;    GoldenOrange  = 0FB0H;    LightAqua = 01FBH;
  49.    BrickRed  = 0D00H;    CadmiumYellow = 0FD0H;    SkyBlue   = 06FEH;
  50.    Red       = 0F00H;    LemonYellow   = 0FF0H;    LightBlue = 06CEH;
  51.    RedOrange = 0F80H;    ForestGreen   = 00B1H;    Blue      = 000FH;
  52.    Orange    = 0F90H;    LightGreen    = 08E0H;    Purple    = 091FH;
  53.    LimeGreen = 0BF0H;    BrightBlue    = 061FH;    Violet    = 0C1FH;
  54.    Green     = 00F0H;    DarkBlue      = 006DH;    Pink      = 0FACH;
  55.    DarkGreen = 02C0H;    MediumGrey    = 0999H;    Tan       = 0DB9H;
  56.    BlueGreen = 00BBH;    LightGrey     = 0CCCH;    Brown     = 0C80H;
  57.    Aqua      = 00DBH;    Magenta       = 0F1FH;    DarkBrown = 0A87H;
  58.    Black     = 0000H;
  59.    MaxColors = 32;     (* # of colors to load when calling SetScreenColors *)
  60.  
  61. VAR
  62.    ScreenColors : ARRAY [0..MaxColors-1] OF CARDINAL;
  63.  
  64.  
  65.    PROCEDURE SetScreenColors (CurrentScreen : ScreenPtr);
  66.  
  67.  
  68.  (* SetScreenColors assigns ScreenColors to the color registers of Current- *)
  69.  (* Screen. Though ScreenColors is assigned values upon import of this mo-  *)
  70.  (* dule, I have spent little time determining which combinations are aes-  *)
  71.  (* thetically appealing. Thus, don't count on ScreenColors having the same *)
  72.  (* default values in later versions of this module.                        *)
  73.  
  74. END ColorTools.
  75.